package com.wx;


import common.util.HttpClientUtil;

/**
 * Created by dong peng on 2018/2/7.
 */
public class TestWx {

    private static String orderQuery = "https://api.mch.weixin.qq.com/pay/orderquery";

    public static void main(String[] args) {
        String reqBody = "<xml><body>测试商家-商品类目</body>" +
                "<trade_type>NATIVE</trade_type>" +
                "<mch_id>11473623</mch_id>" +
                "<sign_type>HMAC-SHA256</sign_type>" +
                "<nonce_str>b1089cb0231011e7b7e1484520356fdc</nonce_str>" +
                "<detail />" +
                "<fee_type>CNY</fee_type>" +
                "<device_info>WEB</device_info>" +
                "<out_trade_no>20161909105959000000111108</out_trade_no>" +
                "<total_fee>1</total_fee>" +
                "<appid>wxab8acb865bb1637e</appid>" +
                "<notify_url>http://test.letiantian.com/wxpay/notify</notify_url>" +
                "<sign>78F24E555374B988277D18633BF2D4CA23A6EAF06FEE0CF1E50EA4EADEEC41A3</sign>" +
                "<spbill_create_ip>123.12.12.123</spbill_create_ip></xml>";

        String r = HttpClientUtil.postXml("https://api.mch.weixin.qq.com/pay/unifiedorder",reqBody);
        System.out.printf(r);
    }
}
